import training from '@/router/modular/training';
import examing from '@/router/modular/examing';
import course from './course';

const OrganizationChild = [
  {
    path: 'User/index',
    component: () => import('@/views/layout/Children/Organization/User/index.vue'),
    meta: {
      title: "用户主页",
      index: '/Organization/user/index'
    },
  },
  {
    path: 'User/details/:id',
    component: () => import('@/views/layout/Children/Organization/User/details.vue'),
    meta: {
      title: "用户详情",
      index: '/Organization/user/index'
    },
  }, {
    path: 'User/add',
    component: () => import('@/views/layout/Children/Organization/User/add.vue'),
    meta: {
      title: "添加用户",
      index: '/Organization/user/index'
    },
  },
  {
    path: "index/index",
    component: () => import('@/views/layout/Children/Organization/index/index.vue'),
    meta: {
      title: "组织管理",
      index: '/Organization/index/index'
    }
  }, {
    path: "index/add",
    component: () => import('@/views/layout/Children/Organization/index/add.vue'),
    meta: {
      title: "添加组织",
      index: '/Organization/index/index'

    }
  },
  {
    path: "index/add/:id",
    component: () => import('@/views/layout/Children/Organization/index/add.vue'),
    meta: {
      title: "添加组织",
      index: '/Organization/index/index'
    }
  },
  {
    path: "index/details/:id",
    component: () => import('@/views/layout/Children/Organization/index/details.vue'),
    meta: {
      title: "组织详情",
      index: '/Organization/index/index'
    }
  },
  {
    path: "job/index",
    component: () => import('@/views/layout/Children/Organization/job/index.vue'),
    meta: {
      title: "职务管理",
      index: '/Organization/job/index'
    }
  },
  {
    path: "job/details/:id",
    component: () => import('@/views/layout/Children/Organization/job/details.vue'),
    meta: {
      title: "职务详情",
      index: '/Organization/job/index'
    }
  },
  {
    path: 'job/add',
    component: () => import('@/views/layout/Children/Organization/job/add.vue'),
    meta: {
      title: "添加职务",
      index: '/Organization/job/index'
    }
  }
];

const RightChild = [
  {
    path: "index/index",
    component: () => import('@/views/layout/Children/Right/index/index.vue'),
    meta: {
      title: "权限主页",
      index: '/Right/index/index'
    }
  },
  {
    path: "index/details/:id",
    component: () => import('@/views/layout/Children/Right/index/details.vue'),
    meta: {
      title: "权限详情",
      index: '/Right/index/index'
    }
  },
  {
    path: "index/add",
    component: () => import('@/views/layout/Children/Right/index/add.vue'),
    meta: {
      title: "添加权限",
      index: '/Right/index/index'
    }
  },
  {
    path: "index/add/:id",
    component: () => import('@/views/layout/Children/Right/index/add.vue'),
    meta: {
      title: "添加权限",
      index: '/Right/index/index'
    }
  },
  {
    path: "authorization/index",
    component: () => import('@/views/layout/Children/Right/authorization/index.vue'),
    meta: {
      title: "用户授权",
      index: '/Right/authorization/index'
    }
  },
  {
    path: "authorization/authorization/:id",
    component: () => import('@/views/layout/Children/Right/authorization/authorization.vue'),
    meta: {
      title: "给予用户授权",
      index: '/Right/authorization/index'
    }
  },
  {
    path: "rightconfig/index",
    component: () => import('@/views/layout/Children/Right/rightconfig/index.vue'),
    meta: {
      title: "权限配置",
      index: "/Right/rightconfig/index"
    }
  },
  {
    path: "rightconfig/add",
    component: () => import('@/views/layout/Children/Right/rightconfig/add.vue'),
    meta: {
      title: "添加权限配置",
      index: "/Right/rightconfig/index"
    }
  },
  {
    path: "rightconfig/details/:id",
    component: () => import('@/views/layout/Children/Right/rightconfig/details.vue'),
    meta: {
      title: "权限配置详情",
      index: "/Right/rightconfig/index"
    }
  },
  {
    path: "rightconfig/setting/:id",
    component: () => import('@/views/layout/Children/Right/rightconfig/setting.vue'),
    meta: {
      title: "权限配置",
      index: "/Right/rightconfig/index"
    }
  },
];

const logChild = [
  {
    path: "login/index",
    component: () => import('@/views/layout/Children/log/login/index.vue'),
    meta: {
      title: "登录日志",
      index: '/log/login/index'
    }
  }, {
    path: "error/index",
    component: () => import('@/views/layout/Children/log/error/index.vue'),
    meta: {
      title: "错误日志",
      index: '/log/error/index'

    }
  }
  , {
    path: "action/index",
    component: () => import('@/views/layout/Children/log/action/index.vue'),
    meta: {
      title: "行为日志",
      index: '/log/action/index'
    }
  }
]


const ApiDocumentChild = [
  {
    path: "index/index",
    component: () => import('@/views/layout/Children/ApiDocument/index/index.vue'),
    meta: {
      title: "接口文档",
      index:'/ApiDocument/index/index'
    }
  },
]

const HomeChild = [
  {
    path: "index/index",
    component: () => import('@/views/layout/Children/Home/index/index.vue'),
    meta: {
      title: "主页",
      index:'/home/index/index'
    }
  },
]

export const BaseChild = [ {
  path: '/Organization',
  name: 'Organization',
  component: () => import('@/views/layout/Children/Organization/index.vue'),
  meta: {
    title: '组织'
  },
  children: OrganizationChild
}, {
  path: '/Right',
  name: 'Right',
  component: () => import('@/views/layout/Children/Right/index.vue'),
  meta: {
    title: '权限'
  },
  children: RightChild,
},
{
  path: '/log',
  name: 'log',
  component: () => import('@/views/layout/Children/log/index.vue'),
  meta: {
    title: '日志'
  },
  children: logChild,
}
  , {
  path: '/ApiDocument',
  component: () => import('@/views/layout/Children/ApiDocument/index.vue'),
  meta: {
    title: "接口文档"
  },
  children: ApiDocumentChild,

}
  // , {
  //   path: 'AddApiDocument',
  //   component: () => import('@/views/layout/Children/ApiDocument/add.vue'),
  //   meta: {
  //     title: "添加接口文档"
  //   },
  // },
  , {
  path: '/Home',
  component: () => import('@/views/layout/Children/Home/index.vue'),
  meta: {
    title: '主页',
   
  },
  children: HomeChild

},
...training,
...examing,
...course
]